<html>
<head>
    <meta charset="UTF-8">
</head>
<body onload="wap_pay();" bgColor="#EFEFEF">
<table width="100%" height="100%">
<tr><td height="100%" align="center" style="vertical-align:middle;height:300px;text-aligh:center"><font color="gray" size="7">正在支付，请稍候...</font></td></tr>
</table>
     
     <script src="./pingpp.js" type="text/javascript"></script>
<script src="../js/jquery.min.js" type="text/javascript"></script>
<script>

	function getQueryString(name)
	{
		 var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
		 var r = window.location.search.substr(1).match(reg);
		 if(r!=null)return  unescape(r[2]); return null;
	}

    var YOUR_URL = '/mythcall/api/Account_payRequire.do';
    function wap_pay() {

        var channel = getQueryString("channel");
		var sellPackageId = getQueryString("sellPackageId");
		var telNum = getQueryString("telNum");
		var myTelNum = getQueryString("myTelNum");

		var jsonStr = JSON.stringify({
            token: 'free', 
			channel: channel,
            sellPackageId: sellPackageId,
			telNum: telNum,
			myTelNum: myTelNum
        });

		var postStr = 'account='+jsonStr;

		
		$.ajax({
		type: "POST",
		url: YOUR_URL,
		data: postStr,
		dataType: "text",
		success:function(response,status,xhr) {
		//alert(status);
		//alert(response);
			pingpp.createPayment(response, function(result, err) {
                    //console.log(result);
                    //console.log(err.msg);
                    //console.log(err.extra);
					alert(result);
					alert(err.msg);
					alert(err.extra);
                });
		},
		error: function(response,status,xhr) {
		//alert(status);
		var retStr = JSON.stringify(response);
		//alert(retStr);
		  //alert("error");
		}
		}); 
		
        
    }
	
	
</script>
     
</body>




</html>
